﻿Public Class FormTrungGiaCam
    Private Sub FormTrungGiaCam_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        Me.LoaitrungTableAdapter.Fill(Me.LaptrinhnangcaoDataSet.loaitrung)
        Me.LoaigiacamTableAdapter.Fill(Me.LaptrinhnangcaoDataSet.loaigiacam)
        Me.DmgiacamTableAdapter.Fill(Me.LaptrinhnangcaoDataSet.dmgiacam)
        Me.TrunggiacamTableAdapter.Fill(Me.LaptrinhnangcaoDataSet.trunggiacam)
        Me.GiacamTableAdapter.Fill(Me.LaptrinhnangcaoDataSet.giacam)
        Me.IGridControlDs01.ForceInitialize()
        Me.IGridViewDs01.MoveLast()
    End Sub
    Public Sub New()
        InitializeComponent()
        Me.setSoTab(1)
        Me.setObj(Me.LaptrinhnangcaoDataSet, LaptrinhnangcaoDataSet.giacam, GiacamBindingSource, TableAdapterManager, GiacamTableAdapter, MaITextEdit1, GiatriITextEdit1)
        Me.setTab1(Me.LaptrinhnangcaoDataSet.trunggiacam, FKtrunggiacamgiacamBindingSource, TrunggiacamTableAdapter)
        Me.setColumnsChange(New ArrayList() From {"soluong", "dongia", "thanhtien", "chinhanh"})
        'Me.setColumnValue(colEx1, Me.colthanhtien1)
        'Me.setColumnValue(colEx2, Me.colchinhanh2)
    End Sub

    Private Sub IGridViewChiTiet01_InitNewRow(sender As System.Object, e As DevExpress.XtraGrid.Views.Grid.InitNewRowEventArgs) Handles IGridViewChiTiet01.InitNewRow
        Me.IGridViewChiTiet01.SetFocusedRowCellValue("uid", System.Guid.NewGuid)
        Me.IGridViewChiTiet01.SetFocusedRowCellValue("soluong", 0)
        Me.IGridViewChiTiet01.SetFocusedRowCellValue("dongia", 0)
        Me.IGridViewChiTiet01.SetFocusedRowCellValue("tnhtien", 0)
    End Sub
End Class
